package com.jzo2o.market.controller.coupon;


import com.jzo2o.common.model.PageResult;
import com.jzo2o.market.model.dto.request.CouponOperationPageQueryReqDTO;
import com.jzo2o.market.model.dto.response.CouponInfoResDTO;
import com.jzo2o.market.service.ICouponService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 优惠券活动相关接口-领取记录
 *
 * @author itcast
 * @create 2023/7/7 19:34
 **/
@RestController("marketCouponController")
@RequestMapping("/operation/coupon")
@Slf4j
@Api(tags = "优惠券活动相关接口-领取记录")
public class MarketCouponController {

    @Autowired
    private ICouponService couponService;

    /**
     * 领取记录查询接口
     *
     * @param
     * @return
     */
    @GetMapping("/page")
    @ApiOperation("领取记录查询接口")
    public PageResult<CouponInfoResDTO> selectPage(CouponOperationPageQueryReqDTO couponOperationPageQueryReqDTO) {
        return couponService.pageQury(couponOperationPageQueryReqDTO);
    }
}
